package models

import "xiaoshuo/dao"

type AdminMenu struct {
	Id    int
	Title string
}

func (AdminMenu) TableName() string {
	return "admin_menu"
}

func GetAdminMenu(id int) (AdminMenu, error) {
	var adminMenu AdminMenu
	err := dao.Db.Where("id=?", id).First(&adminMenu).Error
	return adminMenu, err
}
